Skip to content

Remove the dead dep_gen guards left in the scheduler cold path - #1530

Merged
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
ChaoZheng109:cleanup/dep-gen-empty-guards
Jul 27, 2026
Merged

Remove the dead dep_gen guards left in the scheduler cold path#1530
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
ChaoZheng109:cleanup/dep-gen-empty-guards

Conversation

@ChaoZheng109

Copy link
Copy Markdown
Collaborator

Summary

PR #1486 moved dep_gen_aicpu_init() off the scheduler cold path and onto the orchestrator thread (aicpu_executor.cpp), but left the two cold-path call sites as empty if (is_dep_gen_enabled()) {} shells instead of removing them. This cleans up the vestiges:

  • Drop both empty if (is_dep_gen_enabled()) {} guards in post_handshake_profiling_init() and post_handshake_init().
  • Remove the now-stale comment above post_handshake_init() that still described the init() popping the initial free_queue buffer here — that no longer runs in this file.
  • Remove the now-unused #include "aicpu/dep_gen_collector_aicpu.h"; no dep_gen symbol remains in either scheduler_cold_path.cpp.

a2a3 and a5 carried the identical arrangement and are cleaned together. Pure deletion, SIMPLER_DFX-gated device code only — no behaviour change.

Testing

  • Simulation tests pass
  • Hardware tests pass (if applicable)

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dec98c9d-1bcc-4af8-a433-808dc8879fed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Both scheduler cold-path variants remove the obsolete dep-gen collector include and no-op initialization branches. PMU initialization remains the active profiling setup where enabled.

Changes

Scheduler cold-path cleanup

Layer / File(s) Summary
Profiling initialization cleanup
src/a2a3/.../scheduler_cold_path.cpp, src/a5/.../scheduler_cold_path.cpp
Removes the dep-gen collector include and no-op dep-gen branches from profiling initialization while retaining PMU setup.
Post-handshake initialization cleanup
src/a2a3/.../scheduler_cold_path.cpp, src/a5/.../scheduler_cold_path.cpp
Removes the post-handshake dep-gen placeholder and preserves PMU initialization under its enablement guard.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

Poem

A bunny found dead code in the snow,
And clipped its unused hooks below.
PMU stayed bright,
Guiding cold paths right—
Clean hops through the build now flow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing dead dep_gen guards from the scheduler cold path.
Description check ✅ Passed The description matches the changeset and correctly explains the cleanup of empty dep_gen guards and stale include/comment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ChaoZheng109
ChaoZheng109 force-pushed the cleanup/dep-gen-empty-guards branch from d49fc83 to e83a5a0 Compare July 27, 2026 10:46
dep_gen_aicpu_init() moved to the orchestrator thread (aicpu_executor.cpp)
so the schedulers no longer touch it. The two cold-path call sites were
emptied to `if (is_dep_gen_enabled()) {}` rather than removed, and the
comment above post_handshake_init still described the init() that popped
the initial free_queue buffer here — behaviour that no longer runs in
this file.

Drop both empty guards, the stale comment, and the now-unused
dep_gen_collector_aicpu.h include. No dep_gen symbol remains in either
scheduler_cold_path.cpp. a2a3 and a5 carry the identical arrangement and
are cleaned together.
@ChaoZheng109
ChaoZheng109 merged commit f44c715 into hw-native-sys:main Jul 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant